package com.example.demo.controller.mall;

import com.example.demo.entity.Order;
import com.example.demo.service.SeckillService;
import com.example.demo.service.shop.OrderService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

/**
 * 
 * @author Administrator
 *
 */
@RequestMapping("/pay")
@Controller
public class PayController {
    @Resource
    private OrderService orderService;
    @Resource
    private SeckillService seckillService;
    
    @GetMapping("")
    public String pay(Long order_id, Model model) {
        Order order = orderService.findById(order_id);
        model.addAttribute(order);
        return "web/shop/pay/preview";
    }
}
